// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
//首页
import home from '@/views/Home';
//入口页面
import Entrance from '@/views/entrance'

/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
//文件管理
import Files from '@/views/system/files'
// 权限管理
import Permission from '@/views/system/Permission';
//字典管理
import Dict from '@/views/system/Dict';

//托育早教
import Nursery from '@/views/work/nursery'
//中高考培优
import Private from '@/views/work/private'
//Ai素养
import AI from '@/views/work/ai'
//语言素养
import Language from '@/views/work/lanaguage'
//幼小衔接
import Young from '@/views/work/young'
//幼儿园课程
import Course from '@/views/work/course'
//课件
import Courseware from '@/views/teaching/Courseware'

import MyPage from '@/views/teaching/MyPage';

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [
      // {
      //   path: '/',
      //   name: 'entrance',
      //   component: Entrance,
      //   hidden: true,
      //   meta: {
      //     requireAuth: false
      //   }
      // },
      {
        path: '/login',
        name: '',
        component: login,
        hidden: true,
        meta: {
          requireAuth: false
        }
      }, {
            path: '/index',
            name: '首页',
            component: index,
            iconCls: 'el-icon-tickets',
            children: [{
                path: '/home',
                name: '首页',
                component: home,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/files',
                name: '文件管理',
                component: Files,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/user',
                name: '用户管理',
                component: user,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/pression',
                name: '菜单管理',
                component: Module,
                meta: {
                    requireAuth: true
                }
            }, {
              path: '/system/dict',
              name: '字典管理',
              component: Dict,
              meta: {
                requireAuth: true
              }
            }, {
                path: '/system/Role',
                name: '角色管理',
                component: Role,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Permission',
                name: '权限管理',
                component: Permission,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/work/nursery',
                name: '托育早教',
                component: Nursery,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/work/private',
                name: '中高开培优',
                component: Private,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/work/ai',
                name: 'AI素养',
                component: AI,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/work/language',
                name: '语言素养',
                component: Language,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/work/young',
                name: '幼小衔接',
                component: Young,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/work/course',
                name: '幼儿园课程',
                component: Course,
                meta: {
                    requireAuth: true
                }
            }, {
              path: '/teaching/Courseware',
              name: '课件',
              component: Courseware,
              meta: {
                requireAuth: true
              }
            }, {
              path: '/mypage',
              name: 'MyPage',
              component: MyPage,
              meta: {
                requireAuth: true
              }
            }

            ]
        }]
})
